<div class="crumb-wrap">
    <div class="crumb-list"> <i class="icon-font"></i>
        <a href="<?=site_url()?>">首页</a>
        <span class="crumb-step">&gt;</span>
        <span class="crumb-name"><?=$sort?></span>
    </div>
</div>
<div class="search-wrap">
    <div class="search-content">
        <form action="<?=site_url('project/p_list')?>" method="get">
            <table class="search-tab">
                <tr>
                    <th width="120">选择分类:</th>
                    <td>
                        <select name="sid" id="">
                            <option value="0">其他分类</option>
                            <?php foreach($list_sort as $k => $v):?>
                            <?php if(!empty($_GET['sid']) && $_GET['sid'] == $v['id']):?>
                                <option value="<?=$v['id']?>" selected><?=$v['title']?></option>
                            <?php else:?>
                                <option value="<?=$v['id']?>" ><?=$v['title']?></option>
                            <?php endif;?>
                            <?php endforeach;?>
                        </select>
                    </td>
                    <th width="70">关键字:</th>
                    <td><input class="common-text" placeholder="项目名称" name="keywords" value="<?=empty($_GET['keywords'])? '' : $_GET['keywords'] ?>" id="" type="text"></td>
                    <td>
                        <input class="btn btn-primary btn2" value="查询" type="submit"></td>
                    <?php $sid = empty($_GET['sid'])? 0 : $_GET['sid'] ?>
                    <td><a href="<?=site_url('project/p_list?sid='.$sid)?>" class="btn btn-primary btn2">重置</a></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="result-wrap">
    <form name="myform" id="myform" method="post">
        <div class="result-content">
            <table class="result-tab" width="100%">
                <tr>
                    <th>项目ID</th>
                    <th>项目名称</th>
                    <th>销量</th>
                    <th width="50%">属性</th>
                    <th width="10%">操作</th>
                </tr>
                <?php foreach($list as $k => $v):?>
                <tr>
                    <td><?=$v['id']?></td>
                    <td>
                        <?=$v['title']?>
                        <?php if($v['create_time']+(3600*24*15) > time()):?>
                            <span style="font-size: 11px;color:red">新</span>
                        <?php endif;?>
                    </td>
                    <td><?=$v['count']?></td>
                    <td>
                        <?php foreach($v['par'] as $key => $value):?>
                        <a href="<?=site_url('parameters/show?pid='.$value['id'])?>"><?=$value['title']?>
                        <?php if($value['update_time']+(3600*24*18) > time()):?>
                            <span style="font-size: 11px;color:red">新</span>
                        <?php endif;?>
                        </a>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <?php endforeach;?>
                    </td>
                    <td><a href="<?=site_url('project/show?pid='.$v['id'])?>" class="btn btn-primary btn2">查看详情</a></td>
                </tr>
                <?php endforeach;?>
            </table>
            <div class="list-page"><?=$page?></div>
        </div>
    </form>
</div>